define(function(require,exports,module){
	var aw = require("ajaxwrapper");
	
    module.exports = function(data,callback){
    	var pkServicePointIn = [];
		for(var i=0;i<data.length;i++){
			pkServicePointIn.push(data[i].signUpRegister.pkSignUpRegister);
		}
		
		aw.ajax({
			url:"api/signupcharge/query",
			data:{
				"signUpRegister.pkSignUpRegisterIn":pkServicePointIn.join(",")
			},
			dataType:"json",
			success:function(idata){
				for(var i=0;i<data.length;i++){
					if(idata.length == 0){
						data[i].payable = 0;
					}else{
						for(var j=0;j<idata.length;j++){
							if(idata[j].signUpRegister.pkSignUpRegister == data[i].signUpRegister.pkSignUpRegister){
								data[i].payable = idata[j].payable;
								break;
							}
						}
					}
				}
				callback(data);
			}
		});
    };
});
